package com.chouxiaozi.simple;

import java.util.HashMap;
import java.util.Map;

public class Leader {

    public static Map<String, IEmployee> EMPLOYEE_MAP = new HashMap();

    static {
        EMPLOYEE_MAP.put("设计", new EmployeeA());
        EMPLOYEE_MAP.put("编程", new EmployeeB());
    }

    public void doWork(String command){
        EMPLOYEE_MAP.get(command).work(command);
    }
}
